<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
        //如果用for In 连函数都会被打印 所以加一个判断
      var obj = {
        name: "wqz",
        stu_id: "00001",
        id: "4210811111111111111",
        sex: "female",
        class: "software",
        intro_myself: function () {
          for (var key in obj) {
            if (typeof obj[key] != "function")
              document.write(key + ":&nbsp" + obj[key] + "<br>");
          }
        },
      };
      obj.intro_myself();
    </script>
  </body>
</html>
